package snafu.implementation.worlds;

import java.awt.Color;
import java.awt.Graphics;
import java.awt.geom.Point2D;
import java.util.List;

import snafu.framework.objects.WorldObject;
import snafu.framework.worlds.WorldMapPanel;
import snafu.implementation.states.literals.color.ColorLiteral;

public class SquareWorldMapPanel extends WorldMapPanel {
	public SquareWorldMapPanel(SquareWorldMap map) {
		super(map);
	}
	
	@Override
	protected void paintObjects(List<WorldObject> objects, Point2D tileSize, Color borderColor, Graphics g) {
		for (WorldObject object : objects) {
			Color color = object.getState().getLiteral(ColorLiteral.class, Color.GRAY);

			g.setColor(color);
			g.fillRect(0, 0, (int) tileSize.getX(), (int) tileSize.getY());
			g.setColor(borderColor);
			g.drawRect(0, 0, (int) tileSize.getX(), (int) tileSize.getY());
		}
	}
}
